package cn.tedu.csmall.product.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 添加图片的DTO类
 *
 * @author Chen
 * @since 2023/2/11 8:40:40
 */
@Data
public class PictureAddNewDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1646284694033515862L;
    /**
     * 相册id
     */
    @NotNull(message = "添加图片失败，必须提交相册ID！")
    @Schema(description = "相册ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9527")
    private Long albumId;
    /**
     * 图片url
     */
    @NotNull(message = "添加图片失败，必须提交图片url！")
    @Schema(description = "图片URL", requiredMode = Schema.RequiredMode.REQUIRED, example = "url")
    private String url;
    /**
     * 图片简介
     */
    private String description;
    /**
     * 图片宽度，单位：px
     */
    private Integer width;
    /**
     * 图片高度，单位：px
     */
    private Integer height;
    /**
     * 是否为封面图片，1=是，0=否
     */
    private Integer isCover;
    /**
     * 排序序号
     */
    private Integer sort;

}
